﻿Imports Global_Visas_Business_Layer
Partial Public Class frmSearchCompany
    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.Close()
    End Sub

    Private Sub lvwSimilar_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lvwSimilar.MouseDoubleClick
        GlobalCRM.CurrentCompanyID = Me.lvwSimilar.SelectedItem.row.itemarray(0).ToString
        CommonDataFunctions.GblFunc_Goto_ID(GlobalCRM.CurrentCaseID, CommonDataFunctions.DBIdTypes.CompanyID)
        'frmMainDisplay.MdiParent = frmMDIMain
        'frmAddAccount.CloseForm()
        'frmMainDisplay.WindowState = FormWindowState.Maximized
        'frmMainDisplay.Show()
        'frmMainDisplay.TabControl1.SelectTab("tabcompany")
        'sumathivinayak s - Redirect this to maindisplay page
        Me.Close()
    End Sub

    Private Sub frmSearchCompany_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles Me.KeyUp
        If e.Key = Key.Escape Then
            Call btnCancel_Click(sender, e)
        End If
    End Sub

    Private Sub frmSearchCompany_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        GeneralTasks.ChangeTheme(Me)
        GeneralTasks.EnumerateandFill(Me.LogicalChildren)
    End Sub
End Class
